/*
 * @Author: gxl
 * @email: 1515533507@qq.com
 * @Date: 2021-08-17 19:34:18
 * @LastEditTime: 2022-03-29 15:48:56
 * @FilePath: \web\node个人博客\blog_web\src\util\index.js
 */
function formatting(time) {
  var time = new Date(time)
  var y = time.getFullYear()
  var m = time.getMonth() + 1
  var d = time.getDate()
  var h = time.getHours()
  var mm = time.getMinutes()
  var s = time.getSeconds()
  return y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s
}

function repair0(m) {
  return m < 10 ? '0' + m : m
}
